package com.chy.sprbootmanual.service.imp;

import com.chy.sprbootmanual.bean.Gallery;
import com.chy.sprbootmanual.bean.Order;
import com.chy.sprbootmanual.dao.OrderMapper;
import com.chy.sprbootmanual.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Order> getAll() {
        return orderMapper.getAll();
    }

    @Override
    public List<Gallery> getImgList() {
        return orderMapper.getImgList();
    }

    @Override
    public void delete(Integer id) {
        orderMapper.delete(id);
    }

    @Override
    public void add(Order order, String addImgId) {
        orderMapper.add(order,addImgId);
    }

    @Override
    public void update(Order order, String updateImgId) {
        orderMapper.update(order,updateImgId);
    }

    @Override
    public void upload(String name) {
        orderMapper.upload(name);
    }
}
